s = input().split(" ")
a = float(s[0])
b = float(s[1])

l = 0
r = a

def check(k):
    if k * b > a:
        return False


    if k == 0:
        return True

    d = (1/pow(k, 0.5) - 1/pow(k + 1, 0.5)) * a

    if d >= b:
        return True
    else:
        return False

while l < r:
    mid = (l + r + 1) // 2
    if check(mid):
        l = mid
    else:
        r = mid - 1


res = l * b + a / pow(1 + l, 0.5)

print("%.10f"%res)


